Shear Transformations

Introduction

Shear transformations are a special class of linear transformations that distort shapes while preserving certain geometric features. They are among the simplest transformations that change angles but keep areas (in some cases) and parallelism intact.

In this article, we explore:

What Is a Shear?

A shear transformation is a linear transformation that “slides” points in a fixed direction, with the amount of sliding proportional to their coordinate in another direction.

Key characteristics:

A shear distorts shapes into slanted versions of themselves—rectangles become parallelograms, squares become rhombi.

Matrix Forms of Shears

In two dimensions, the most common shears are:

Horizontal shear

$$\begin{pmatrix} 1 & k \\ 0 & 1 \end{pmatrix}$$

Horizontal shearing

Effect:

Vertical shear

$$\begin{pmatrix} 1 & 0 \\ k & 1 \end{pmatrix}$$

Vertical shearing

Effect:

General properties

Geometric Interpretation

A shear transformation:

Examples:

Visual intuition:

Computing a Shear

Given a shear matrix $S$ and a vector $v$, compute $Sv$ using matrix multiplication.

Example (horizontal shear): $$S = \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix}, \quad v = \begin{pmatrix} 3 \\ 1 \end{pmatrix}$$ Then: $$Sv = \begin{pmatrix} 1\cdot 3 + 2\cdot 1 \\ 0\cdot 3 + 1\cdot 1 \end{pmatrix} = \begin{pmatrix} 5 \\ 1 \end{pmatrix}$$ Interpretation:

Applications

Shears appear in:

They are also useful pedagogically because they:

Calculator

Creating shear matrices

  • Shear matrices are easy to create, so no helper functions exist for them
[1, k; 0, 1] [1, 0; k, 1]

Exercises

Exercises

  1. Apply the horizontal shear
    $S = \begin{pmatrix}1 & 3 \\ 0 & 1\end{pmatrix}$
    to the vector $v = (2,4)$.

    Solution

    $$S(2,4) = (1\cdot 2 + 3\cdot 4,\; 4) = (14,4)$$
  2. Apply the vertical shear
    $T = \begin{pmatrix}1 & 0 \\ -2 & 1\end{pmatrix}$
    to the vector $w = (5,1)$.

    Solution

    $$T(5,1) = (5,\; -2\cdot 5 + 1) = (5,-9)$$
  3. A shear sends $(1,0)$ to $(1,0)$ and $(0,1)$ to $(4,1)$.
    Write down the matrix of this shear.

    Solution


    The matrix with columns equal to the images of the basis vectors is $$\begin{pmatrix} 1 & 4 \\ 0 & 1 \end{pmatrix}$$
  4. Describe in words what a vertical shear does to a square.

    Solution


    A vertical shear slants the square so that its vertical edges tilt left or right, turning the square into a parallelogram while keeping opposite sides parallel.
  5. True or false: A shear can change the area of a shape.

    Solution


    False. A shear in 2D always has determinant $1$, so it preserves area.
  6. Find the inverse of the shear
    $S = \begin{pmatrix}1 & -5 \\ 0 & 1\end{pmatrix}$.

    Solution


    The inverse of $$S = \begin{pmatrix}1 & -5 \\ 0 & 1\end{pmatrix}$$ is $$S^{-1} = \begin{pmatrix}1 & 5 \\ 0 & 1\end{pmatrix}$$ because adding $5$ undoes subtracting $5$.